Task Based Help / Customize Page Layout / Specifying Custom Paper Size
In This Topic
Specifying Custom Paper Size
In This Topic

By default, C1.C1Report.C1Report creates reports using the default paper size on the default printer.

You can specify the paper size and orientation using the C1.C1Report.Layout.PaperSize and C1.C1Report.Layout.Orientation properties. However, C1.C1Report.C1Report checks that the selected paper size is available on the current printer before rendering, and changes to the default paper size if the selected setting is not available.

If you want to specify a certain paper size and use it regardless of the printers available, set the C1.C1Report.Layout.PaperSize property to Custom, and set the C1.C1Report.Layout.CustomWidth and C1.C1Report.Layout.CustomHeight properties to the page dimensions (in twips).

Using the C1ReportDesigner

Complete the following steps to specify a custom paper size of 25" x 11" for your report using the C1ReportDesigner application:

  1. Open the C1ReportDesigner. For more information on how to access the C1ReportDesigner, see Accessing C1ReportDesigner from Visual Studio.
  2. Create a new report|tag=Creating a Basic Report Definition or open an existing report. Once you have the report in the C1ReportDesigner, you can modify the report properties.
  3. Click the Close Print Preview button to begin editing the report.
  4. In Design mode, select your report from the drop-down list above the Properties window.
  5. Locate Layout and expand the property node to view all available properties.
  6. Set the Custom Height property to 25" or 25in.

Notice that the measurement is converted into twips automatically. The Properties window displays the measurement in twips (36000).

  1. Set the Custom Width property to 11" or 11in.

The Properties window displays the measurement in twips (15840).

  1. Set the PaperSize property to Custom.

In Code

Regardless of what is available on the printer, the following code sets the report paper to 25" x 11":

Visual Basic
Copy Code
c1r.Layout.PaperSize = PaperKind.Custom
c1r.Layout.CustomHeight = 25 * 1440 ' in twips
c1r.Layout.CustomWidth = 11 * 1440
C#
Copy Code
c1r.Layout.PaperSize = PaperKind.Custom;
c1r.Layout.CustomHeight = 25 * 1440; // in twips
c1r.Layout.CustomWidth = 11 * 1440;

 

See Also